//
//  LoginModel.m
//  SchoolProduct
//
//  Created by 蒋松涵 on 16/9/3.
//  Copyright © 2016年 sm. All rights reserved.
//

#import "LoginModel.h"


@implementation LoginModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
    if ([key isEqualToString:@"id"]) {
        
        _ID = value;
        NSLog(@"LoginModel-json中id已经替换为ID");
    }
    NSLog(@"LoginModel--键值对不匹配%@",key);
}

- (void)setValue:(id)value forKey:(NSString *)key {
    
    if ([key isEqualToString:@"webConfig"]) {
        
        [self.webConfig setValuesForKeysWithDictionary:value];
        NSLog(@"ok");
    }else {
        
        [super setValue:value forKey:key];
    }
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        
        self.webConfig = [[WebConfigModel alloc]init];
    }
    return self;
}

@end
